package com.lkbaby.command;

import java.util.ArrayList;
import java.util.List;

public class BrokerInvoker {
	private List<OrderCommand> orderList = new ArrayList<>();

	public void takeOrder(OrderCommand orderCommand){
		orderList.add(orderCommand);
	}

	public void placeOrders(){
		for (OrderCommand order : orderList) {
			order.execute();
		}
		orderList.clear();
	}
}
